#ifndef H_ENCHANT
#define H_ENCHANT
#include <precompiled.h>
#include "item.h"
namespace weo
{
    namespace engine
    {
        namespace item
        {
            class Enchant : public gc
            {
            private:		
                std::vector<weo::engine::item::Attribute> m_Attributes;
                std::string m_Name;
                unsigned int m_Slot;
                unsigned int m_Id;
                unsigned int m_Level;
                static Enchant* s_None;
            public:
                static const Enchant* None();
                Enchant(std::string name, unsigned int id, std::vector<weo::engine::item::Attribute> attrs = std::vector<Attribute>(), unsigned int slot = 4095);
                unsigned int Id() const {return m_Id;};
                unsigned int Slot() const {return m_Slot;};
                unsigned int Level() const {return 70;};
                std::string Name() const {return m_Name;};
                const std::vector<weo::engine::item::Attribute>* Attributes() const {return &m_Attributes;};
                static void BuildEnchantVector(bool useFingers);
                static const Enchant* GetEnchant(const unsigned int slot,int nr=-1);
                static const Enchant* GetEnchantById(const unsigned int id);
                static const std::vector<std::vector<Enchant>>* GetEnchants();
                Enchant& operator=(Enchant const& enchant);
                bool operator==(const Enchant& other);
                bool operator<(const Enchant& other);
                friend std::size_t hash_value(Enchant& x)
                {
                    return x.Id();
                }
                const size_t Hash() const {return m_Id;};
            };
            typedef const weo::engine::item::Enchant* EnchantPtr;
            static std::vector<std::vector<Enchant>> Enchants;
            static std::map<std::string,unsigned int> EnchantSlot;		
        };
    };
};
#endif